package com.ochnas.volunteersignup.ui;
/**
 * @author Mike Calvo@citronellasoftware.com
 *         Created Mar 15, 2008 - 4:17:25 PM
 *         
 */
import javax.faces.application.FacesMessage;
import javax.faces.context.FacesContext;


public class FacesApplicationService implements ApplicationService{
    public void addErrorMessage(String message) {
        addErrorMessage(null, message);
    }

    public void addErrorMessage(String clientId, String message) {
        FacesContext faces = FacesContext.getCurrentInstance();
        faces.addMessage(clientId, new FacesMessage(FacesMessage.SEVERITY_ERROR, message, message));
    }

    public String getRequestParameter(String parameterName) {    	
        FacesContext faces = FacesContext.getCurrentInstance();
        return faces.getExternalContext().getRequestParameterMap().get(parameterName);
    }
    
}


